package com.qingfeng.medical.biz.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qingfeng.medical.biz.order.domain.entity.OrderInfo;
import com.qingfeng.medical.biz.order.domain.entity.PaymentInfo;
import com.qingfeng.medical.biz.order.domain.enums.PaymentTypeEnum;

import java.util.Map;

/**
 * 支付信息表
 *
 * @author 清风学Java
 * @date 2023-05-11 13:43:46
 */
public interface PaymentInfoService extends IService<PaymentInfo> {

    /**
     * 保存支付信息
     * @param orderInfo
     * @param wechat
     */
    void savePaymentInfo(OrderInfo orderInfo, PaymentTypeEnum wechat);

    /**
     * 支付成功
     * @param outTradeNo
     * @param wechat
     * @param resultMap
     */
    void paySuccess(String outTradeNo, PaymentTypeEnum wechat, Map<String, String> resultMap);

    /**
     * 获取支付记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, PaymentTypeEnum paymentType);
}

